{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T12:05:08.885351Z",
     "start_time": "2020-10-23T12:05:08.817505Z"
    }
   },
   "outputs": [],
   "source": [
    "import ffmpeg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T12:20:23.465004Z",
     "start_time": "2020-10-23T12:20:23.392262Z"
    }
   },
   "outputs": [],
   "source": [
    "info=ffmpeg.probe('/www/wwwroot/119.23.182.180/yukari_gal/src/audio/01.mp3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T12:19:44.417897Z",
     "start_time": "2020-10-23T12:19:44.400059Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'streams': [{'index': 0,\n",
       "   'codec_name': 'mp3',\n",
       "   'codec_long_name': 'MP3 (MPEG audio layer 3)',\n",
       "   'codec_type': 'audio',\n",
       "   'codec_time_base': '1/22050',\n",
       "   'codec_tag_string': '[0][0][0][0]',\n",
       "   'codec_tag': '0x0000',\n",
       "   'sample_fmt': 'fltp',\n",
       "   'sample_rate': '22050',\n",
       "   'channels': 2,\n",
       "   'channel_layout': 'stereo',\n",
       "   'bits_per_sample': 0,\n",
       "   'r_frame_rate': '0/0',\n",
       "   'avg_frame_rate': '0/0',\n",
       "   'time_base': '1/14112000',\n",
       "   'start_pts': 707200,\n",
       "   'start_time': '0.050113',\n",
       "   'duration_ts': 56818114560,\n",
       "   'duration': '4026.226939',\n",
       "   'bit_rate': '32000',\n",
       "   'disposition': {'default': 0,\n",
       "    'dub': 0,\n",
       "    'original': 0,\n",
       "    'comment': 0,\n",
       "    'lyrics': 0,\n",
       "    'karaoke': 0,\n",
       "    'forced': 0,\n",
       "    'hearing_impaired': 0,\n",
       "    'visual_impaired': 0,\n",
       "    'clean_effects': 0,\n",
       "    'attached_pic': 0,\n",
       "    'timed_thumbnails': 0}},\n",
       "  {'index': 1,\n",
       "   'codec_name': 'png',\n",
       "   'codec_long_name': 'PNG (Portable Network Graphics) image',\n",
       "   'codec_type': 'video',\n",
       "   'codec_time_base': '0/1',\n",
       "   'codec_tag_string': '[0][0][0][0]',\n",
       "   'codec_tag': '0x0000',\n",
       "   'width': 640,\n",
       "   'height': 640,\n",
       "   'coded_width': 640,\n",
       "   'coded_height': 640,\n",
       "   'has_b_frames': 0,\n",
       "   'sample_aspect_ratio': '1:1',\n",
       "   'display_aspect_ratio': '1:1',\n",
       "   'pix_fmt': 'rgb24',\n",
       "   'level': -99,\n",
       "   'color_range': 'pc',\n",
       "   'refs': 1,\n",
       "   'r_frame_rate': '90000/1',\n",
       "   'avg_frame_rate': '0/0',\n",
       "   'time_base': '1/90000',\n",
       "   'start_pts': 4510,\n",
       "   'start_time': '0.050111',\n",
       "   'duration_ts': 362360425,\n",
       "   'duration': '4026.226944',\n",
       "   'disposition': {'default': 0,\n",
       "    'dub': 0,\n",
       "    'original': 0,\n",
       "    'comment': 0,\n",
       "    'lyrics': 0,\n",
       "    'karaoke': 0,\n",
       "    'forced': 0,\n",
       "    'hearing_impaired': 0,\n",
       "    'visual_impaired': 0,\n",
       "    'clean_effects': 0,\n",
       "    'attached_pic': 1,\n",
       "    'timed_thumbnails': 0},\n",
       "   'tags': {'comment': 'Other'}},\n",
       "  {'index': 2,\n",
       "   'codec_name': 'png',\n",
       "   'codec_long_name': 'PNG (Portable Network Graphics) image',\n",
       "   'codec_type': 'video',\n",
       "   'codec_time_base': '0/1',\n",
       "   'codec_tag_string': '[0][0][0][0]',\n",
       "   'codec_tag': '0x0000',\n",
       "   'width': 640,\n",
       "   'height': 640,\n",
       "   'coded_width': 640,\n",
       "   'coded_height': 640,\n",
       "   'has_b_frames': 0,\n",
       "   'sample_aspect_ratio': '1:1',\n",
       "   'display_aspect_ratio': '1:1',\n",
       "   'pix_fmt': 'rgb24',\n",
       "   'level': -99,\n",
       "   'color_range': 'pc',\n",
       "   'refs': 1,\n",
       "   'r_frame_rate': '90000/1',\n",
       "   'avg_frame_rate': '0/0',\n",
       "   'time_base': '1/90000',\n",
       "   'start_pts': 4510,\n",
       "   'start_time': '0.050111',\n",
       "   'duration_ts': 362360425,\n",
       "   'duration': '4026.226944',\n",
       "   'disposition': {'default': 0,\n",
       "    'dub': 0,\n",
       "    'original': 0,\n",
       "    'comment': 0,\n",
       "    'lyrics': 0,\n",
       "    'karaoke': 0,\n",
       "    'forced': 0,\n",
       "    'hearing_impaired': 0,\n",
       "    'visual_impaired': 0,\n",
       "    'clean_effects': 0,\n",
       "    'attached_pic': 1,\n",
       "    'timed_thumbnails': 0},\n",
       "   'tags': {'title': 'image/jpeg', 'comment': 'Cover (front)'}}],\n",
       " 'format': {'filename': '/www/wwwroot/119.23.182.180/yukari_gal/src/audio/01.mp3',\n",
       "  'nb_streams': 3,\n",
       "  'nb_programs': 0,\n",
       "  'format_name': 'mp3',\n",
       "  'format_long_name': 'MP2/3 (MPEG audio layer 2/3)',\n",
       "  'start_time': '0.050111',\n",
       "  'duration': '4026.226939',\n",
       "  'size': '17093852',\n",
       "  'bit_rate': '33965',\n",
       "  'probe_score': 51,\n",
       "  'tags': {'album': 'RRRepeat!!!',\n",
       "   'encoder': 'Lavf58.29.100',\n",
       "   'TOTALTRACKS': '1',\n",
       "   'track': '1',\n",
       "   'title': 'RRRepeat!!!',\n",
       "   'genre': 'General Soundtrack',\n",
       "   'disc': '1/1',\n",
       "   'album_artist': 'Gyari',\n",
       "   'artist': 'Gyari',\n",
       "   'gnid': '3CD3N13Q707279320V581D7F06D87FDF19863CA74361B45ACC09P2',\n",
       "   'date': '2017'}}}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
